Active Passive Cell Balancing For Lithium Ion And Lifepo4 Battery